<?php
/**
 * The Template for displaying all single posts.
 *
 * @package Argo
 */

get_header(); ?>

<div class="section">
	<div id="blog-content" class="container">
	<div class="hero">
		<h1><?php _e('SERVICES', 'argo'); ?></h1>
	</div>
	<div class="row">
		<div class="span12">
		<?php while ( have_posts() ) : the_post(); ?>
		
		<?php the_content(); ?>
		
		<?php endwhile; // end of the loop. ?>
		</div>
		
			<div class="span12"><h2><?php _e('OUR OTHER SERVICES', 'argo'); ?></h2>
			<div class="row-fluid">
			<?php
			$html = "<div id='gallery-0' class='carousel slide'> \n <div class='carousel-inner'>";
	
			$args = array('posts_per_page' => -1,
						  'post_type'            => 'service',
						  'post__not_in'   => array(get_the_ID()),
						);
			$the_query = new WP_Query( $args );
			if($the_query->have_posts()) :
				$i = 0;
				while ( $the_query->have_posts() ) : $the_query->the_post();
					$active = ($i==0)?'active':'';
					$html .= "<div class='span4'>";
					$html .= get_the_post_thumbnail(get_the_ID(), 'medium');
					$html .= "<h3>".get_the_title()."</h3>";
					$html .= "</div>";
					$i++;
				endwhile;
			endif;
			
			$html .= "
					</div>\n
					<a class='left carousel-control' href='#gallery-0' data-slide='prev'>".__('Prev', 'argo')."</a>\n
					<a class='right carousel-control' href='#gallery-0' data-slide='next'>".__('Next', 'argo')."</a>
				</div>\n";
			echo $html;
			?>
			</div>
			</div>
		</div>
	</div>
</div>

<?php get_footer(); ?>